package com.atguigu.myzhxy;

import java.util.Scanner;

public class xinhao {
    public static void main(String[] arg){
        Scanner sc = new Scanner(System.in);
        String str=sc.nextLine();
        System.out.println(Lengthest(str));
    }
    public static StringBuffer Lengthest(String str) {
        StringBuffer sb0=new StringBuffer();
        sb0.append(0);
        for (int i=0;i<str.length();i++){
            StringBuffer sb=new StringBuffer();
            int index=0;
            for (int j=i;j<str.length();j++){

                if (index%2==0){//奇数项
                    if (str.charAt(j)=='0'){
                        sb.append(0);
                    }else {
                        if (sb.length()-1>sb0.length()){//最后一个数是1，就是说sb要删2个

                            int a=sb.length()-sb0.length();
                            for (int m=0;m<(a-1)/2;m++){
                                    sb0.append(10);
                            }
                        }
                        break;
                    }
                }else {
                    if (str.charAt(j)=='1'){
                        sb.append(1);
                    }else {
                        if (sb.length()-1>sb0.length()){
                            int a=sb.length()-sb0.length();
                            for (int m=0;m<(a+1)/2;m++){
                                    sb0.append(10);
                            }
                        }
                        break;
                    }
                }
                index++;
            }
        }
        return sb0;
    }
}
